﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace TravelWeb.Models
{
    [Bind(Exclude = "TourID")]
    public class Tour
    {
        [ScaffoldColumn(false)]
        public int TourID { get; set; }
        [Required(ErrorMessage = "Tour Name is required")]
        [DisplayName("Tour Name")]
        [StringLength(160)]
        public String TourName { get; set; }
        [Range(0.00, 100000000.00, ErrorMessage = "Price must be between 0 VND and 100,000,000 VND")]
        public double AdultPrice { get; set; }
        [Range(0.00, 100000000.00, ErrorMessage = "Price must be between 0 VND and 100,000,000 VND")]
        public double ChildPrice { get; set; }
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
        public DateTime StartDate { get; set; }
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
        public DateTime EndDate { get; set; }
        [ScaffoldColumn(false)]
        public int? PromotionID { get; set; }
        [ScaffoldColumn(false)]
        public String Status { get; set; }

        public Promotion Promotion { get; set; }
    }

}